import format from 'lib/util/format'
import {propConfig} from '../apis/core-util'

export default {
  crash_count:[{
    title:'崩溃次数',
    key:'count',
    sortable:true,
    formatter:format.integer
  },{
    title:'影响设备',
    key:'affected',
    sortable:true,
    formatter:format.integer
  },{
    title:'首次发生时间',
    key:'firstTime',
    sortable:true,
    formatter:format.stampToTime
  },{
    title:'最后发生时间',
    key:'lastTime',
    sortable:true,
    formatter:format.stampToTime
  }],
  crash_rate:[{
    title:'崩溃率',
    key:'crash_rate',
    sortable:true,
    formatter:format.rate
  },{
    title:'崩溃次数',
    key:'count',
    sortable:true,
    formatter:format.integer
  },{
    title:'应用调用次数',
    key:'appUseCount',
    sortable:true,
    formatter:format.integer
  },{
    title:'影响设备',
    key:'affected',
    sortable:true,
    formatter:format.integer
  },{
    title:'首次发生时间',
    key:'firstTime',
    sortable:true,
    formatter:format.stampToTime
  },{
    title:'最后发生时间',
    key:'lastTime',
    sortable:true,
    formatter:format.stampToTime
  }],
  error_count:[{
    title:'错误率',
    key:'error_rate',
    sortable:true,
    formatter:format.rate
  },{
    title:'错误请求次数',
    key:'error_count',
    sortable:true,
    formatter:format.integer
  },{
    title:'请求次数',
    key:'total_count',
    sortable:true,
    formatter:format.integer
  }],
  error_rate:[{
    title:'错误率',
    key:'error_rate',
    sortable:true,
    formatter:format.rate
  },{
    title:'错误请求次数',
    key:'error_count',
    sortable:true,
    formatter:format.integer
  },{
    title:'请求次数',
    key:'total_count',
    sortable:true,
    formatter:format.integer
  }],
  thp:[{
    title:'吞吐量',
    key:'thp',
    sortable:true,
    formatter:propConfig['thp'].format
  },{
    title:'平均响应时间',
    key:'avg_resp',
    sortable:true,
    formatter:propConfig['avg_resp'].format
  },{
    title:'请求次数',
    key:'resp_count',
    sortable:true,
    formatter:propConfig['resp_count'].format
  }],
  avg_resp:[{
    title:'吞吐量',
    key:'thp',
    sortable:true,
    formatter:propConfig['thp'].format
  },{
    title:'平均响应时间',
    key:'avg_resp',
    sortable:true,
    formatter:propConfig['avg_resp'].format
  },{
    title:'请求次数',
    key:'resp_count',
    sortable:true,
    formatter:propConfig['resp_count'].format
  }],
  total_receive_size:[{
    title:'传输数据量',
    key:'total_receive_size',
    sortable:true,
    formatter:propConfig['total_receive_size'].format
  }]
}
